package com.example.ylsys.plants.contract;

import android.content.Context;

import com.example.ylsys.plants.base.BaseMvpActivity;
import com.example.ylsys.plants.base.BaseView;
import com.example.ylsys.plants.base.MyApplication;
import com.example.ylsys.plants.bean.BackResultBean;
import com.example.ylsys.plants.bean.LoginParamsBean;
import com.example.ylsys.plants.bean.LoginUserBean;

import java.util.Map;

import io.reactivex.Flowable;
import io.reactivex.Observable;

public interface WelcomingContract {
    interface Role_Model{
        Observable<BackResultBean> post_Api(Map<String, String> url_map,Map<String, String> post_map);
        Observable<BackResultBean> role_get_Api(Map<String, String> url_map);
        Observable<BackResultBean> get_Api(Map<String, String> url_map);
        LoginParamsBean get_userParams(Context context);

    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onSuccess(LoginUserBean loginUserVm);


    }

    interface Presenter {

        /**
         * @param context
         * @return 数据库获取用户信息
         */
        LoginParamsBean get_userParams(Context context);

        /**
         * @param userParams
         * 服务器请求用户信息
         */
        void get_role(LoginParamsBean userParams);

    }

}
